package com.shengong.luckymoney;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

@RestController
@RequestMapping("/hello")
public class HelloController {

//    @Value("${minMoney}")
//    private BigDecimal minMoney;
//    @Value("${description}")
//    private String description;
    @Autowired
    private LimitConfig limitConfig;

//    @GetMapping({"/say","hi"})
//    @GetMapping("/say")
//    @PostMapping("/say")
//    @RequestMapping("/say/{id}")
//    public String hello(@PathVariable("id") Integer id){
////        return "minMoney:"+limitConfig.getMinMoney() + limitConfig.getDescription();
////        return "index";
//        return "id:"+id;
//    }
    @GetMapping("/say")
    public String say(@RequestParam(value = "id",required = false,defaultValue = "0") Integer id){
        return "id:"+id;
    }
}
